from copy import deepcopy
import string
import numpy as np


class Base_Station:
    def __init__(self, id: string, initial_location: np.array):
        self.id = deepcopy(id)
        self.location = deepcopy(initial_location)
        self.users = []
        self.H = 50
        self.comp_resource = 5e9  # 基站计算资源，单位GHz

    def reset(self):
        self.users = []

    def comp_time(self, uav):
        data_total = 0
        for cache in uav.cache_state:
            data_size = cache["data_size"]
            comp_density = cache["comp_density"]
            data_total += data_size * comp_density
            # 计算时间
            comp_delay = data_total / self.comp_resource

